<?php
namespace common\service;
use common\models\Log;

/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/2/26
 * Time: 17:24
 */
class LogaddService extends BaseService{


    //操作日志入库
    public static function logAdd($admin_name,$log_content,$jursid_type=1){

        $operation_ip = CommonService::getIP();
        $log_time=time();
        $model=new Log();
        $model->setAttributes(['admin_name'=>$admin_name,'operation_ip'=>$operation_ip,'log_time'=>$log_time,'log_content'=>$log_content,'jursid_type'=>$jursid_type]);
        $data=$model->save();
    }

}